package core;

import java.util.*;


/**
 * The abstract implementation of the basic counter "game"
 * 
 * @author CodyS
 * 
 */
public abstract class Game {
	/**
	 * 
	 * @param add
	 */
	public abstract void addToCounter(int add);

	/**
	 * Call this to notify the server that a player is ready.
	 * 
	 * @param p
	 *            The player that is ready.
	 */
	public abstract void playerReady(Player p);

	/**
	 * Add a connecting player to the game.
	 * 
	 * @param p
	 */
	public abstract void addPlayer(Player p);

	/**
	 * Remove a player from the currently connected players.
	 * 
	 * @param p
	 */
	public abstract void removePlayer(Player p);

	/**
	 * Handle a card being played
	 * 
	 * @param c
	 */
	public abstract void playCard(Card c);

	/**
	 * Roll the dice and allocate resources to players
	 */
	public abstract void rollDice();

	/**
	 * Build a city or a settlement at a location.
	 * 
	 * @param c
	 */
	public abstract void buildPoint(Constructable c, Location l);
	
	/**
	 * Build a road with a beginning and end location
	 * 
	 * @param c
	 */
	public abstract void buildRoad(Constructable c, Location l1, Location l2);

	/**
	 * Notify the game that a player wishes to trade some stuff for some other
	 * stuff
	 * 
	 * @param seeker
	 *            Who wants the stuff
	 * @param offer
	 *            The stuff they want to give
	 * @param receive
	 *            The stuff they want back
	 */
	public abstract void offerTrade(Player seeker,
			Hashtable<ResourceType, Integer> offer,
			Hashtable<ResourceType, Integer> receive);

	/**
	 * Notify the server that you are done with your turn
	 */
	public abstract void endTurn();

	/**
	 * Move the robber somewhere
	 * 
	 * @param l
	 */
	public abstract void moveRobber(Location l);

	/**
	 * Take a resource from a player
	 * 
	 * @param take
	 *            Who wants to take it
	 * @param stealfrom
	 *            Who they want to steal from
	 */
	public abstract void steal(Player take, Player stealfrom);

	/**
	 * Remove some cards from a player's hands
	 * 
	 * @param lose
	 *            What they want lose
	 */
	public abstract void loseCards(Hashtable<ResourceType, Integer> lose);
}
